﻿@model IEnumerable<EasyStep.Data.Entities.TestProject>

@{
    ViewBag.Title = "Constants Lists";
}
<h2>Constant Lists</h2>
<small>Following groups of constants have been generated:</small>
<ul>
    <li class="buttons-li">
        @Html.ActionLink("Create New", "Create", "TestConsts")
    </li>

     
@foreach (var item in Model)
{
    <li class="project-li">
        <a href="@Url.Action("Details", "Project", new { id = item.Id })">
            @Html.DisplayFor(modelItem => item.Name)
       </a>
       <ul class="project-consts">
       @if (item.ConstantLists.Count() == 0) 
       { 
            <li class="item const-li">
                no one exists in this project
            </li>
       }
       @foreach (var citem in item.ConstantLists)
       { 
           <li class="item const-li">
                <a href="@Url.Action("Details", "TestConsts", new { id = citem.Id })">
                    @Html.DisplayFor(modelItem => citem.Name)
                </a>
           </li>
       }
       </ul>
    </li>
}    
</ul>